package org.dinqy;

import java.util.List;

/**
 * @author armandino (at) gmail.com
 */
public final class QueryBean {
    private final String query;
    private final List<Object> queryArguments;
    private final Integer limit;
    private final Integer offset;
    
    public QueryBean(CharSequence query, List<Object> queryArguments,
            Integer limit, Integer offset) {
        
        this.query = query.toString();
        this.queryArguments = queryArguments;
        this.limit = limit;
        this.offset = offset;
    }

    public String getQuery() {
        return query;
    }

    public List<Object> getQueryArguments() {
        return queryArguments;
    }

    public Integer getLimit() {
        return limit;
    }

    public Integer getOffset() {
        return offset;
    }
    
    public boolean hasLimit() {
        return limit != null;
    }
    
    public boolean hasOffset() {
        return offset != null;
    }
}
